package alfred.mdp.worker;

import alfred.mdp.messages.worker.Reply;
import alfred.mdp.messages.worker.Request;
import alfred.mdp.Service;
import org.zeromq.ZMsg;

/**
 */
public abstract class WorkerService implements Service<Request, Reply> {

    @Override
    public Reply execute(Request input) {
        return new Reply(input.getClientAddress(), process(input.getBody()));
    }

    public abstract ZMsg process(ZMsg input);
}
